<template>
    <div class="wrapper">
        <div style="fontsize: 16px; lineheight: 24px">您确定要操作{{ title }}吗？</div>
        <div style="margin: 10px 0">
            如为批量操作，所有批次都将以此{{ title }}时间为准
        </div>
        <div ref="depart-form">
            {{ title }}时间
            <el-date-picker v-model="time" :append-to-body="false"  value-format="timestamp"  type="datetime" placeholder="选择日期时间">
            </el-date-picker>
        </div>
        <div style="margin-top: 20px; text-align: right">
            <el-button id="node_cancel" @click="handleClose">取 消</el-button>
            <el-button id="node_ok" type="primary" @click="handleClickSubmit">确 定</el-button>
        </div>
    </div>
</template>

<script>
import { timestamp10 } from "@/utils/mUtils";
import { MessageBox } from 'element-ui';
export default {
    name: 'finishTime',
    components: {},
    props: ['title', 'hanldeOk'],
    data() {
        return {
            time: Date.now()
        };
    },
    mounted() { },
    methods: {
        handleClickSubmit() {
            const { hanldeOk } = this;
            hanldeOk && hanldeOk(timestamp10(this.time));
            MessageBox.close();
        },
        handleClose() {
            MessageBox.close();
        }
    },
};
</script>
<style lang="scss" scoped>
.wrapper {
    width: 380px;
}
</style>